package com.example.teesystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.teesystem.entity.Chapter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 28131
* @description 针对表【t_chapter】的数据库操作Mapper
* @createDate 2022-03-25 08:22:18
* @Entity com.example.teesystem.entity.Chapter
*/
@Mapper
public interface ChapterMapper extends BaseMapper<Chapter> {
    List<Integer> getIdByChapterAndCourseId(@Param("courseId") Integer courseId);
    
    List<Chapter> selectAllByCourseId(@Param("courseId") Integer courseId);
    
    List<Chapter> selectAllByCourseIdOrderByChapter(@Param("courseId") Integer courseId);

    List<Integer> getIdByCourseId(@Param("courseId") Integer courseId);

    Chapter getChapterByIdAndCourseId(@Param("id") Integer id, @Param("courseId") Integer courseId);

    Chapter getChapterById(@Param("id") Integer id);
}
